import {
    Model,
    Table,
    PrimaryKey,
    AutoIncrement,
    Column,
    Sequelize
} from "sequelize-typescript";

@Table({
    modelName: "user"
})
export default class User extends Model<User> {
    @PrimaryKey
    @AutoIncrement
    @Column(Sequelize.INTEGER(64))
    userId: number;

    @Column(Sequelize.STRING)
    userPhone: string;

    @Column(Sequelize.INTEGER(12))
    userSex: number;

    @Column(Sequelize.STRING)
    userStuId: string;

    @Column(Sequelize.STRING)
    userPass: string;

    @Column(Sequelize.STRING)
    userHeadImg: string;

    @Column(Sequelize.STRING)
    userName: string;

    @Column
    salt: string;

    @Column(Sequelize.STRING)
    tokenKey: string;

    @Column(Sequelize.DATE)
    tokenOverTime: Date;
}